]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
screenshot: Clean up when creating stream failed
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 25 Jan 2021 11:12:44 +0000 (12:12 +0100)
committerMarge Bot <marge-bot@gnome.org>
Thu, 28 Jan 2021 21:47:50 +0000 (21:47 +0000)
Otherwise the tracked screenshot operation will block all future
requests from the same sender.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3618

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1589>

js/ui/screenshot.js

index 05120e1a2283ffaa4d71a271f332f35d6a01b14a..8a92c62130a4c5e01c3cbce78b563ab279a50e3f 100644 (file)
@@ -109,6 +109,7 @@ var ScreenshotService = class {
                 return [stream, file];
             } catch (e) {
                 invocation.return_gerror(e);
+                this._removeShooterForSender(invocation.get_sender());
                 return [null, null];
             }
         }
@@ -126,6 +127,7 @@ var ScreenshotService = class {
         }
 
         invocation.return_gerror(err);
+        this._removeShooterForSender(invocation.get_sender());
         return [null, null];
     }